#pragma once
#include "IVFSystem.h"


namespace irr {
    namespace io {
        class IFileSystem;
    };
};
/**
    Irrlichts virtual file system implementation
*/
class IrrVFSystem : public IVFSystem
{
public:
    IrrVFSystem(void);

    /** Initialize the file system */
    bool Init();
    /** Shutdown the system */
    void Shutdown();

    /** Add a folder to the archive */
    bool AddFolder( const std::string &file );
    /** Add a Pak File to the archive */
    bool AddPakFile( const std::string &file );
    /** Add a Zip File to the archive */
    bool AddZipFile( const std::string &file );

    /** Change the working Dir */
    bool ChangeWorkingDir( const std::string &dir );

    /** Get the working dir */
    const std::string GetWorkingDir();

    /** Get the file directory */
    const std::string GetFileDir( const std::string &file );

    /** Test to see if file exists */
    bool FileExists( const std::string &f );

    /** Create a file for writing */
    MFile* CreateVFile( const std::string &fileName );

    /** Open a file */
    MFile* OpenFile( const std::string &file );

private:
    irr::io::IFileSystem*   m_IrrFileSys;   // Irrlichts file system

public:
    virtual ~IrrVFSystem(void);
};
